<?php
include (__DIR__ . '/config.php');
include __DIR__ . '/inc_constant.php';
define('PATH_WWW', str_replace(FILE_NAME_INIT, DIR_NAME_WWW, str_replace('\\', '/', __FILE__)));

// 取得框架根目录
defined('PATH_SYS') or define('PATH_SYS', str_replace('\\', '/', realpath(dirname(dirname(__FILE__) . ''))));
define('PATTH_FRAMEWORK', PATH_SYS . "/" . DIR_NAME_FRAMEWORK);

// 服务器环境配置
ini_set('memory_limit', -1);
ini_set('date.timezone', PHP_TIMEZONE);
set_include_path(PATH_SYS . '/' . DIR_NAME_APP);

include PATTH_FRAMEWORK . '/base/autoloader.class.php';
framework_base_autoloader::init();

if (DEBUG_MODE) {
    error_reporting(E_ALL ^ E_NOTICE);
} else {
    error_reporting(0);
}

/**
 * session
 */
if (defined('SESSION_OPEN') && SESSION_OPEN) {
    framework_base_session::start();
}

//处理'引号
if (!get_magic_quotes_gpc()) {
    $_REQUEST = framework_static_function::strip_array($_REQUEST);
    $_POST = framework_static_function::strip_array($_POST);
    $_GET = framework_static_function::strip_array($_GET);
}
